<?php
/**
 * Created by swagger_zxd.
 * User: zxd
 * Date: 2017/11/24
 * Time: 10:08
 */

namespace App\Models\Test;




use Illuminate\Database\Eloquent\Model;

class Phone extends Model{

    protected $table='phone';

    /**
     * 获取手机对应的用户
     * 属于user 参数1:userid 参数2;id
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function user()
    {
        return $this->belongsTo(User::class,'user_id','id');
    }


}